<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta
          name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0"
  />
  <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
  <meta name="keywords" content="{$SEO['keyword']}">
  <meta name="description" content="{$SEO['description']}">
  <script src="/statics/fals/js/jquery.js"></script>
  <script src="/statics/fals/js/rem.js"></script>
  <link rel="stylesheet" href="/statics/fals/styles/fals_list.css" />
  <link rel="stylesheet" href="/statics/fals/styles/base.css" />
</head>
<body>
<div class="fals_container">
  <div class="fals_title">
    <a href="/"
    ><img
            src="https://cdn.shupian.cn/sp-pt/wap/9uclk0zujeg0000.png"
            alt=""
            class="back"
    /></a>
    方案老师
  </div>
  <div class="fals_tag">
    {pc:content action="category" catid="36" num="3" siteid="$siteid" order="listorder ASC"}
    {loop $data $v}
    <a href="{$v[url]}" class="tag {if $v[catid]==$catid} active {/if}">{$v['catname']}</a>
    {/loop}
    {/pc}
  </div>
  <section class="list">
    {pc:get sql="select domain from dgg_site where siteid = 1" num=1 dbsource="zizhipc" }
    {php $domain = $data?$data['domain']:'';unset($data);}
    {php $cat_id = dr_cat_value($catid,'main_catid');}
    {pc:get sql="select a.*,b.relation from dgg_experts a left join dgg_experts_data_0 b on a.id=b.id where a.catid=$cat_id and a.status=99 order by a.id DESC"  num="200" dbsource="zizhipc" }
    {php $experts = $data;}
    {loop $experts $r}
    {php $relation=$r['relation'];}
    {if $relation}
    {php $relations = explode('|',trim($relation,'|'));}
    {php $relations = array_diff($relations, array(null));}
    {php $relations = implode(',',$relations);}
    {php $sql = " `id` IN ($relations)";}
    {pc:get sql="select * from dgg_cases where $sql and status=99 order by id DESC"  num="4" dbsource="zizhipc" }
    {php $records = $data;}
    {php $cases= implode(', ', array_column($records, 'title'));}
    {/if}
    {if $r['thumb'] && $domain}
    {php $thumb_id=$r['thumb'];}
    {pc:get sql="select b.filepath from dgg_attachment b where aid=$thumb_id" num="1" dbsource="zizhipc" }
    {php $thumb=$data? $domain.'uploadfile/'.$data[0]['filepath']:'';}
    {php unset($data);}
    {/if}
    <a href="{$r[url]}" class="list_item">
      <img
              src="{if !empty($thumb) } {$thumb} {else} https://cdn2.shupian.cn/sp-pt/wap/f99ctq3cydk0000.png {/if}"
              class="list_item_img"
      />
      <div class="list_item_right">
        <div class="author_info">
          <div class="name">{$r['title']}</div>
          <div class="tag">
            {php $tags=explode(',',$r['tags']);}
            {loop $tags $tag}
            <span class="tag_item">{$tag}</span>
            {/loop}
          </div>
        </div>
        <div class="row">
          <div class="row_label">从业年限：</div>
          <div class="row_value">{$r['years']}年</div>
        </div>
        <div class="row">
          <div class="row_label">成功案例：</div>
          <div class="row_value">
            {$cases??'-'}
          </div>
        </div>
      </div>
    </a>
    {/loop}
    {/pc}
  </section>
</div>
</body>
</html>
